package cn.bdqn.dao;

import cn.bdqn.pojo.Employees;
import cn.bdqn.pojo.Integral;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 刘旻昊
 * @Date: Created in 2020/6/22  19:07
 */
@Repository
@Mapper
public interface EmployeesMapper {
    //查询员工信息全部
    List<Employees> listAll();
    //查询我的信息
    List<Employees> listAllByid321(@Param("id") Integer id);
    //查询总积分
    List<Employees> listAllByid(@Param("id") Integer id);
    //查询积分详情
    List<Integral> listAllByid123(@Param("id") Integer id);
    //查全部
    List<Integral> getEmps(@Param("id") Integer id, @Param("pn") Integer pn);
    //微信登录
    Employees findByOpenid(@Param("openid") String openid);
    //查询数据总条数
    Integer getCount(@Param("id") Integer id);
    //<!--根据id查询-->
    Employees selectByPrimaryKey(Integer id);
    //<!--根据名字查询-->
    Employees selectByUserName(String name);
    //根据输入的邮箱查询全部
    Employees selectByUserNameOrEmail(String userNameOrEmail);
    // <!--修改密码-->
    int updateByPrimaryKey(Employees record);

    int del(@Param("id") Integer id);

    int insert(Employees employees);
    //@Param("name")String name,@Param("schoolName")String schoolName,@Param("className") String className,@Param("address")String address


    Integer upd(Employees employees);
    Employees getById(@Param("id") int id);

    /**
     * 登录
     * @return
     */
    Integer login(Employees employees);

    String password(Employees employees);

    //签到积分+5
    int updateScoer(Employees employees);
}
